package com.smallyu.order.service.impl;

import com.smallyu.order.bean.User;
import com.smallyu.order.dao.YuLoginDao;
import com.smallyu.order.service.YuLoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Objects;

/**
 * @Author: small-yu
 * @Package: com.smallyu.order.service.impl
 * @Project: order
 * @Date: 2024/4/9
 * @Time: 23:05
 */
@Service
public class YuLoginServiceImpl implements YuLoginService {

    @Autowired
    private YuLoginDao yuLoginDao;

    @Override
    public boolean checkUser(User user) {
        if (Objects.nonNull(user)){
            User userBean = yuLoginDao.selectUser(user);
            if (Objects.nonNull(userBean)){
                return true;
            }
        }
        return false;
    }
}
